package com.bsj.travel.service;

import com.bsj.travel.def.global.JsonResult;
import com.bsj.travel.exception.ApiException;

import java.io.IOException;

/**
 * @author yinhao
 * @version 1.0
 * @description 验证码处理
 * @date 2022/9/14
 */
public interface ValidateCodeService {

    /**
     * 生成验证码
     * @return
     * @throws Exception
     */
    JsonResult createCaptcha() throws IOException, ApiException;

    /**
     * 校验验证码
     * @param key
     * @param value
     * @throws Exception
     */
    void checkCaptcha(String key, String value) throws ApiException;
}
